package xhq.java.test.jvm.memory;

import org.openjdk.jol.info.ClassLayout;

/**
 * @Author hq_xu
 * @create 2020/10/18 19:55
 */
public class EmptyObjectSize {
    public static void print() {
        var emptyInstance = new EmptyClass();
        Runtime.getRuntime().gc();
        Runtime.getRuntime().gc();
        Runtime.getRuntime().gc();
        System.out.println(ClassLayout.parseInstance(emptyInstance).toPrintable());
    }
    public static class EmptyClass{}
}
